#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
    float n = 0;
    char quick = 'n';
    scanf("%f %c", &n, &quick);
    int money = 20;
    if (n <= 1)
    {
        money = 20;
    }
    else
    {
        float k = 1.0;
        for (k = 1; k <= n; k++)
        {
            money++;
        }

        if ((k - 1) == n)
        {
            money--;
        }
    }
    if ('y' == quick)
    {
        money += 5;
    }
    printf("%d\n", money);
    return 0;
}